Whole-Program Optimization of Object-Oriented Languages
نویسندگان
چکیده
Whole-Program Optimization of Object-Oriented Languages by Jeffrey Adgate Dean Chairperson of the Supervisory Committee: Professor Craig Chambers Department of Computer Science and Engineering This dissertation examines the use of whole-program optimization as a way of improving the performance of object-oriented programming languages. Although object-oriented programming conveys a number of software engineering benefits, heavy application of its trademark feature, dynamic dispatching, imposes severe performance penalties when programs are compiled using traditional compilation techniques. Several new techniques that rely on whole-program optimization are described, and these techniques substantially improve the performance of object-oriented programs written in Cecil, Java, C++, and Modula-3. Among the new techniques is class hierarchy analysis, which provides the compiler with knowledge of the class hierarchy of the entire program. This is an especially important optimization, because it allows programmers to write their programs using dynamic dispatching for all operations, which preserves maximal flexibility and extensibility, but permits the compiler to optimize away this flexibility when it is unused by a particular program. Exhaustive class testing allows the compiler to optimize message sends that have a limited degree of polymorphism by inserting tests to partition the potential classes of objects that can appear at a call site. A selective specialization algorithm combines static information with dynamic profile data to determine where it is profitable to compile multiple, specialized versions of a single source routine. Inlining trials provide a means of making inlining decisions that take into account the effects of post-inlining optimizations. Whole-program optimization in an interactive programming environment is made possible through the use of selective recompilation, a technique for invalidating only compiled code that is affected by a programming change. The techniques described in the thesis have been implemented in the Vortex compiler, a wholeprogram optimizing compiler developed as part of this dissertation. Whole-program not only speeds up existing features of object-oriented languages, but it also allows new features to be added to languages with little or no cost, enabling more general models of dispatching that result in more natural and uniform programming languages. The benefits of the optimization techniques described in this thesis are shown to already be important, and their importance is likely to only increase as people adopt more and more object-oriented programming styles.
منابع مشابه
Object-oriented Implementation of Intensional Languages
This paper presents an object-oriented implementation of Lucid. We implement each variable in a Lucid program as a class. An object of the class is the variable in a context. An object evaluates itself when it receives a demand for its value and stores the value. Evaluation of a program involves object self-evaluations and message passing of demands among objects. Some optimization issues are a...
متن کاملA SUIF Java Compiler
To compete with optimized C, object-oriented languages need classical optimizations as well as speci c object-oriented optimizations. Therefore, a compiler infrastructure that enables object-oriented compiler research is of great interest for the research community. The SUIF compiler system with the OSUIF extension o ers such a research environment. SUIF de nes an intermediate representation fo...
متن کاملReconciling Responsiveness with Performance in Pure Object-Oriented Languages
Dynamically-dispatched calls often limit the performance of object-oriented programs since object-oriented programming encourages factoring code into small, reusable units, thereby increasing the frequency of these expensive operations. Frequent calls not only slow down execution with the dispatch overhead per se, but more importantly they hinder optimization by limiting the range and effective...
متن کاملQuery Optimization in Object Oriented Databases through Detecting Independent Subqueries
Query optimization is the refining process in database administration and it helps to bring down speed of execution. Some object-oriented languages allows to express queries explicitly in the code, which are optimized using the query optimization techniques from the database domain. With respect to this, a formalized object query language (OQL) has been developed that performs optimization of q...
متن کاملEfficient Separate Compilation of Object-Oriented Languages⋆
Compilers of object-oriented languages used in industry are mainly based on a separate compilation framework. However, the knowledge of the whole program improves the efficiency of compilation; therefore the most efficient implementation techniques are global. In this paper, we propose a compromise by including three global compilation techniques in a genuine separate compilation framework.
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 1996